import React from 'react'

export default class Button extends React.Component {
  test = !true
  constructor(props){
    super(props)
  }
  renderNewDiv = function () {
    let arr = ['dog', 'cat', 'fish']
    let divs = [<div>thea</div>]
    for (var i = 0, len = arr.length; i < len; i++) {
      var ele = arr[i]
      divs.push(<div>{ele}</div>)
    }
    return divs
  }
  render() {
    let arr = ['dog', 'cat2', 'fish']
    return (
      <div className='' style={{
        background: this.test?'#f00':'#00f',
        width: 100,
        height: 100,
      }}  >
        {this.test ? <div>aa</div> : <div>bb</div>}  
        {this.renderNewDiv()}
        {arr.map((v, i) => {
          return <div>{v}+{i}</div>
        })}
      </div>
    )
  }
}